using System;
using Microsoft.SPOT;
using OST.Shared.SharedTypes;

namespace OST.Shared.Interfaces
{
    /// <summary>
    /// interface for timeservice-configuration provider
    /// </summary>
    public interface ITimeServiceConfigurationProvider : INotifyPropertyChanged
    {
        /// <summary>
        /// flag, checks if the actual config is applid
        /// </summary>
        bool IsConfigApplied { get; }

        /// <summary>
        /// manual trigger to read config
        /// </summary>
        TimeServiceConfiguration ReadConfiguration();

        /// <summary>
        /// persists the actual config
        /// </summary>
        /// <param name="timeServiceConfig">time-service-config instance</param>
        void SaveConfiguration(TimeServiceConfiguration timeServiceConfig);

        /// <summary>
        /// Applies actual specified logging configuration
        /// </summary>
        /// <param name="timeServiceConfig">time-service-config instance</param>
        void Apply(TimeServiceConfiguration timeServiceConfig);
    }
}
